package shuai.dao;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;

import shuai.model.User;
@Repository("userDao")
public class UserDaoImpl extends HibernateTemplate implements UserDao {
	@Resource(name="sessionFactory")
	private SessionFactory sessionFactory;
	
	public List<User> findAll() {		
		return super.find("from User");
	}

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
}
